var component;

//var evoTreeArray[];

function startGame() {
    createElement();
    return true;
}

function createElement(elementId) {
    if (component == null)
        component = Qt.createComponent("BasicElement.qml");

    if (component.status == Component.Ready) {
        var dynamicObject = component.createObject(componentsPalette);
        if (dynamicObject == null) {
            console.log("error creating component");
            console.log(component.errorString());
            return false;
        }
        dynamicObject.x = 70;
        dynamicObject.y = 50;

    } else {
        console.log("error loading component");
        console.log(component.errorString());
        return false;
    }
    return true;
}


